/*
 * @Date: 2023-02-21 10:43:49
 * @LastEditTime: 2023-02-21 11:07:32
 * @FilePath: /hash-guess-game/src/api/module/clubMember.ts
 * 介绍:
 */
import { defaHttp, Paging, ApiReturn } from "../index";

/**赛级成员 */
export async function apiGameMember(
  formData: Paging.Req
): ApiReturn<Paging.Data<GameMember.ResItem[]>> {
  const res = await defaHttp.post<Paging.Res<GameMember.ResItem[]>>(
    "/user/recommend",
    formData,
    { mode: ["showError"] }
  );

  if (res.code !== 200) return;
  return res.data;
}
/**赛级成员 */
export namespace GameMember {
  export interface ResItem {
    id: Id;
    address: string;
    created_at: string | Date;
  }
}
/**元老会 */
export async function apiGenr(
  formData: Paging.Req
): ApiReturn<Paging.Data<Genr.ResItem[]>> {
  const res = await defaHttp.post<Paging.Res<Genr.ResItem[]>>(
    "/user/my/recommend",
    formData,
    { mode: ["showError"] }
  );

  if (res.code !== 200) return;
  return res.data;
}
/**元老会 */
export namespace Genr {
  export interface ResItem {
    id: Id;
    address: string;
    created_at: string | Date;
    level: number;
  }
}
